<template>
  <van-swipe @change="onChange">
    <van-swipe-item v-for="(item,index) in banners" :key="index">
      <img src="https://mall.s.maizuo.com/86d8414272e50b4b9a7b185ac30dfc86.png" alt />
    </van-swipe-item>
    <div class="custom-indicator" slot="indicator">{{ current + 1 }}/{{banners.length}}</div>
  </van-swipe>
</template>

<script>
export default {
  props: ["banners"],
  data() {
    return {
      current: 0
    };
  },

  methods: {
    onChange(index) {
      this.current = index;
    }
  }
};
</script>
